Check for features.h.
authorJeff Garzik <jgarzik@src.gnome.org>
Fri, 1 Jan 1999 23:36:32 +0000 (23:36 +0000)
committerJeff Garzik <jgarzik@src.gnome.org>
Fri, 1 Jan 1999 23:36:32 +0000 (23:36 +0000)
        * configure.in, config.h.in:
        Check for features.h.

        * gdk/gdkevents.c (gdk_event_put, gdk_events_queue):
        Fixed bug in linked list append logic by replacing hand-coded
        logic with a call to g_list_append.  Bug found by tml.

        * gdk/gdkimage.c:
        'gcc -ansi -pedantic' on GNU/Linux spews warnings and errors
        in sys/ipc.h, including one specific admonishment to use
        _SVID_SOURCE or _XOPEN_SOURCE.  Manually defined the latter, and
        included features.h if present to obtain the necessary
        side-effects.

        * gtk/gtkclist.c, gtk/gtkeditable.c:
        Eliminates comma-after-final-element warnings.

        * gtk/gtkfontsel.c (gtk_font_selection_init):
        Fixed bug where an intl string was declared as _("x") in
        local var initializer.

16 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
config.h.in
configure.in
gdk/gdkevents.c
gdk/gdkimage.c
gdk/x11/gdkevents-x11.c
gdk/x11/gdkimage-x11.c
gtk/gtkclist.c
gtk/gtkeditable.c
gtk/gtkfontsel.c

index 2c6dfb3e2cf040d71c0c1620fc3ab0dfd8a02767..90e5e12afb4f6c7badc671bd03321120fe140348 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+1999-01-01  Jeff Garzik  <jgarzik@pobox.com>
+
+       * configure.in, config.h.in:
+       Check for features.h.
+
+       * gdk/gdkevents.c (gdk_event_put, gdk_events_queue):
+       Fixed bug in linked list append logic by replacing hand-coded
+       logic with a call to g_list_append.  Bug found by tml.
+
+       * gdk/gdkimage.c:
+       'gcc -ansi -pedantic' on GNU/Linux spews warnings and errors
+       in sys/ipc.h, including one specific admonishment to use
+       _SVID_SOURCE or _XOPEN_SOURCE.  Manually defined the latter, and
+       included features.h if present to obtain the necessary
+       side-effects.
+
+       * gtk/gtkclist.c, gtk/gtkeditable.c:
+       Eliminates comma-after-final-element warnings.
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init):
+       Fixed bug where an intl string was declared as _("x") in
+       local var initializer.
+
 1998-12-31  Jeff Garzik  <jgarzik@pobox.com>
 
        * gtk/gtklabel.c (gtk_label_split_text_wrapped):
index 2c6dfb3e2cf040d71c0c1620fc3ab0dfd8a02767..90e5e12afb4f6c7badc671bd03321120fe140348 100644 (file)
@@ -1,3 +1,26 @@
+1999-01-01  Jeff Garzik  <jgarzik@pobox.com>
+
+       * configure.in, config.h.in:
+       Check for features.h.
+
+       * gdk/gdkevents.c (gdk_event_put, gdk_events_queue):
+       Fixed bug in linked list append logic by replacing hand-coded
+       logic with a call to g_list_append.  Bug found by tml.
+
+       * gdk/gdkimage.c:
+       'gcc -ansi -pedantic' on GNU/Linux spews warnings and errors
+       in sys/ipc.h, including one specific admonishment to use
+       _SVID_SOURCE or _XOPEN_SOURCE.  Manually defined the latter, and
+       included features.h if present to obtain the necessary
+       side-effects.
+
+       * gtk/gtkclist.c, gtk/gtkeditable.c:
+       Eliminates comma-after-final-element warnings.
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init):
+       Fixed bug where an intl string was declared as _("x") in
+       local var initializer.
+
 1998-12-31  Jeff Garzik  <jgarzik@pobox.com>
 
        * gtk/gtklabel.c (gtk_label_split_text_wrapped):
index 2c6dfb3e2cf040d71c0c1620fc3ab0dfd8a02767..90e5e12afb4f6c7badc671bd03321120fe140348 100644 (file)
@@ -1,3 +1,26 @@
+1999-01-01  Jeff Garzik  <jgarzik@pobox.com>
+
+       * configure.in, config.h.in:
+       Check for features.h.
+
+       * gdk/gdkevents.c (gdk_event_put, gdk_events_queue):
+       Fixed bug in linked list append logic by replacing hand-coded
+       logic with a call to g_list_append.  Bug found by tml.
+
+       * gdk/gdkimage.c:
+       'gcc -ansi -pedantic' on GNU/Linux spews warnings and errors
+       in sys/ipc.h, including one specific admonishment to use
+       _SVID_SOURCE or _XOPEN_SOURCE.  Manually defined the latter, and
+       included features.h if present to obtain the necessary
+       side-effects.
+
+       * gtk/gtkclist.c, gtk/gtkeditable.c:
+       Eliminates comma-after-final-element warnings.
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init):
+       Fixed bug where an intl string was declared as _("x") in
+       local var initializer.
+
 1998-12-31  Jeff Garzik  <jgarzik@pobox.com>
 
        * gtk/gtklabel.c (gtk_label_split_text_wrapped):
index 2c6dfb3e2cf040d71c0c1620fc3ab0dfd8a02767..90e5e12afb4f6c7badc671bd03321120fe140348 100644 (file)
@@ -1,3 +1,26 @@
+1999-01-01  Jeff Garzik  <jgarzik@pobox.com>
+
+       * configure.in, config.h.in:
+       Check for features.h.
+
+       * gdk/gdkevents.c (gdk_event_put, gdk_events_queue):
+       Fixed bug in linked list append logic by replacing hand-coded
+       logic with a call to g_list_append.  Bug found by tml.
+
+       * gdk/gdkimage.c:
+       'gcc -ansi -pedantic' on GNU/Linux spews warnings and errors
+       in sys/ipc.h, including one specific admonishment to use
+       _SVID_SOURCE or _XOPEN_SOURCE.  Manually defined the latter, and
+       included features.h if present to obtain the necessary
+       side-effects.
+
+       * gtk/gtkclist.c, gtk/gtkeditable.c:
+       Eliminates comma-after-final-element warnings.
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init):
+       Fixed bug where an intl string was declared as _("x") in
+       local var initializer.
+
 1998-12-31  Jeff Garzik  <jgarzik@pobox.com>
 
        * gtk/gtklabel.c (gtk_label_split_text_wrapped):
index 2c6dfb3e2cf040d71c0c1620fc3ab0dfd8a02767..90e5e12afb4f6c7badc671bd03321120fe140348 100644 (file)
@@ -1,3 +1,26 @@
+1999-01-01  Jeff Garzik  <jgarzik@pobox.com>
+
+       * configure.in, config.h.in:
+       Check for features.h.
+
+       * gdk/gdkevents.c (gdk_event_put, gdk_events_queue):
+       Fixed bug in linked list append logic by replacing hand-coded
+       logic with a call to g_list_append.  Bug found by tml.
+
+       * gdk/gdkimage.c:
+       'gcc -ansi -pedantic' on GNU/Linux spews warnings and errors
+       in sys/ipc.h, including one specific admonishment to use
+       _SVID_SOURCE or _XOPEN_SOURCE.  Manually defined the latter, and
+       included features.h if present to obtain the necessary
+       side-effects.
+
+       * gtk/gtkclist.c, gtk/gtkeditable.c:
+       Eliminates comma-after-final-element warnings.
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init):
+       Fixed bug where an intl string was declared as _("x") in
+       local var initializer.
+
 1998-12-31  Jeff Garzik  <jgarzik@pobox.com>
 
        * gtk/gtklabel.c (gtk_label_split_text_wrapped):
index 2c6dfb3e2cf040d71c0c1620fc3ab0dfd8a02767..90e5e12afb4f6c7badc671bd03321120fe140348 100644 (file)
@@ -1,3 +1,26 @@
+1999-01-01  Jeff Garzik  <jgarzik@pobox.com>
+
+       * configure.in, config.h.in:
+       Check for features.h.
+
+       * gdk/gdkevents.c (gdk_event_put, gdk_events_queue):
+       Fixed bug in linked list append logic by replacing hand-coded
+       logic with a call to g_list_append.  Bug found by tml.
+
+       * gdk/gdkimage.c:
+       'gcc -ansi -pedantic' on GNU/Linux spews warnings and errors
+       in sys/ipc.h, including one specific admonishment to use
+       _SVID_SOURCE or _XOPEN_SOURCE.  Manually defined the latter, and
+       included features.h if present to obtain the necessary
+       side-effects.
+
+       * gtk/gtkclist.c, gtk/gtkeditable.c:
+       Eliminates comma-after-final-element warnings.
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init):
+       Fixed bug where an intl string was declared as _("x") in
+       local var initializer.
+
 1998-12-31  Jeff Garzik  <jgarzik@pobox.com>
 
        * gtk/gtklabel.c (gtk_label_split_text_wrapped):
index 2c6dfb3e2cf040d71c0c1620fc3ab0dfd8a02767..90e5e12afb4f6c7badc671bd03321120fe140348 100644 (file)
@@ -1,3 +1,26 @@
+1999-01-01  Jeff Garzik  <jgarzik@pobox.com>
+
+       * configure.in, config.h.in:
+       Check for features.h.
+
+       * gdk/gdkevents.c (gdk_event_put, gdk_events_queue):
+       Fixed bug in linked list append logic by replacing hand-coded
+       logic with a call to g_list_append.  Bug found by tml.
+
+       * gdk/gdkimage.c:
+       'gcc -ansi -pedantic' on GNU/Linux spews warnings and errors
+       in sys/ipc.h, including one specific admonishment to use
+       _SVID_SOURCE or _XOPEN_SOURCE.  Manually defined the latter, and
+       included features.h if present to obtain the necessary
+       side-effects.
+
+       * gtk/gtkclist.c, gtk/gtkeditable.c:
+       Eliminates comma-after-final-element warnings.
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init):
+       Fixed bug where an intl string was declared as _("x") in
+       local var initializer.
+
 1998-12-31  Jeff Garzik  <jgarzik@pobox.com>
 
        * gtk/gtklabel.c (gtk_label_split_text_wrapped):
index 600d96c43abd9a847df749c7211a84dbaa5ba4ef..f7d9c6c75a9ba870744af092c88c4cd749865959 100644 (file)
 /* Define if you have the <argz.h> header file.  */
 #undef HAVE_ARGZ_H
 
+/* Define if you have the <features.h> header file.  */
+#undef HAVE_FEATURES_H
+
 /* Define if you have the <limits.h> header file.  */
 #undef HAVE_LIMITS_H
 
index 2a4c8207f16fb921f20ba29d7ee30dc9b3966d4e..0e1765c8f67f3cca7313a8bdff5b69993a10c595 100644 (file)
@@ -315,6 +315,8 @@ AC_SUBST(x_ldflags)
 AC_SUBST(x_libs)
 AC_SUBST(xinput_progs)
 
+AC_CHECK_HEADERS(features.h)
+
 if test "x$enable_shm" = "xyes"; then
   # Check for shared memory
   AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
index 9ea15d52bbcdf0fd5eeca605dafb13ee9420dee8..ecffbae84ee87c2120840c5e44ad10a84c9230c0 100644 (file)
@@ -474,24 +474,17 @@ void
 gdk_event_put (GdkEvent *event)
 {
   GdkEvent *new_event;
-  GList *tmp_list;
   
   g_return_if_fail (event != NULL);
   
   new_event = gdk_event_copy (event);
 
-  tmp_list = g_list_alloc();
-  tmp_list->prev = putback_tail;
-  tmp_list->next = NULL;
-  tmp_list->data = new_event;
+  putback_tail = g_list_append(putback_tail, new_event);
 
   if (!putback_events)
-    {
-      putback_events = tmp_list;
-      putback_tail = tmp_list;
-    }
+    putback_events = putback_tail;
   else
-    putback_tail->next = tmp_list;
+    putback_tail = putback_tail->next;
 }
 
 /*
@@ -1877,18 +1870,12 @@ gdk_events_queue (void)
       
       if (gdk_event_translate (event, &xevent))
        {
-         GList *tmp_list = g_list_alloc();
-         tmp_list->prev = queued_tail;
-         tmp_list->next = NULL;
-         tmp_list->data = event;
+         queued_tail = g_list_append(queued_tail, event);
 
          if (!queued_events)
-           {
-             queued_events = tmp_list;
-             queued_tail = queued_events;
-           }
+           queued_events = queued_tail;
          else
-           queued_tail->next = tmp_list;
+           queued_tail = queued_tail->next;
        }
       else
        gdk_event_free (event);
index 5d48182d93f0f60589b99254c18b7fb38e4b1171..81bfb7648fe4220d19177c4aeefa4e8619bd68d6 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
-#include "config.h"
+#include <config.h>
+
+/* gcc -ansi -pedantic on GNU/Linux causes warnings and errors
+ * unless this is defined:
+ * warning: #warning "Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE"
+ */
+#ifndef _XOPEN_SOURCE
+#  define _XOPEN_SOURCE 1
+#endif
+#ifdef HAVE_FEATURES_H
+#  include <features.h>
+#endif
 
 #include <stdlib.h>
 #include <sys/types.h>
index 9ea15d52bbcdf0fd5eeca605dafb13ee9420dee8..ecffbae84ee87c2120840c5e44ad10a84c9230c0 100644 (file)
@@ -474,24 +474,17 @@ void
 gdk_event_put (GdkEvent *event)
 {
   GdkEvent *new_event;
-  GList *tmp_list;
   
   g_return_if_fail (event != NULL);
   
   new_event = gdk_event_copy (event);
 
-  tmp_list = g_list_alloc();
-  tmp_list->prev = putback_tail;
-  tmp_list->next = NULL;
-  tmp_list->data = new_event;
+  putback_tail = g_list_append(putback_tail, new_event);
 
   if (!putback_events)
-    {
-      putback_events = tmp_list;
-      putback_tail = tmp_list;
-    }
+    putback_events = putback_tail;
   else
-    putback_tail->next = tmp_list;
+    putback_tail = putback_tail->next;
 }
 
 /*
@@ -1877,18 +1870,12 @@ gdk_events_queue (void)
       
       if (gdk_event_translate (event, &xevent))
        {
-         GList *tmp_list = g_list_alloc();
-         tmp_list->prev = queued_tail;
-         tmp_list->next = NULL;
-         tmp_list->data = event;
+         queued_tail = g_list_append(queued_tail, event);
 
          if (!queued_events)
-           {
-             queued_events = tmp_list;
-             queued_tail = queued_events;
-           }
+           queued_events = queued_tail;
          else
-           queued_tail->next = tmp_list;
+           queued_tail = queued_tail->next;
        }
       else
        gdk_event_free (event);
index 5d48182d93f0f60589b99254c18b7fb38e4b1171..81bfb7648fe4220d19177c4aeefa4e8619bd68d6 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
-#include "config.h"
+#include <config.h>
+
+/* gcc -ansi -pedantic on GNU/Linux causes warnings and errors
+ * unless this is defined:
+ * warning: #warning "Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE"
+ */
+#ifndef _XOPEN_SOURCE
+#  define _XOPEN_SOURCE 1
+#endif
+#ifdef HAVE_FEATURES_H
+#  include <features.h>
+#endif
 
 #include <stdlib.h>
 #include <sys/types.h>
index 99f4e85e9a4e4b6f391c1f94b57d3fceb7e55710..d674d2c398f273fd26aa85ecfbf6a54e7f3e92e0 100644 (file)
@@ -160,7 +160,7 @@ enum {
   ARG_SELECTION_MODE,
   ARG_ROW_HEIGHT,
   ARG_REORDERABLE,
-  ARG_USE_DRAG_ICONS,
+  ARG_USE_DRAG_ICONS
 };
 
 /* GtkCList Methods */
index 5d8248471ec073df5a499fba33f3682a335e2228..dbd78d63624a1c147c7936f1e64239a3cc77288d 100644 (file)
@@ -64,7 +64,7 @@ enum {
 enum {
   TARGET_STRING,
   TARGET_TEXT,
-  TARGET_COMPOUND_TEXT,
+  TARGET_COMPOUND_TEXT
 };
 
 static void gtk_editable_class_init          (GtkEditableClass *klass);
index bfe4132d78747088638eec6ed4dddaaeb5e3dde4..baae35da732d0d6a08a13a01d98c9bdc0542316b 100644 (file)
@@ -439,7 +439,7 @@ gtk_font_selection_init(GtkFontSelection *fontsel)
   GtkWidget *text_box, *frame;
   GtkWidget *table, *label, *hbox, *hbox2, *clist, *button, *vbox, *alignment;
   gint i, prop, row;
-  gchar *titles[] = { _("Font Property"), _("Requested Value"), _("Actual Value") };
+  gchar *titles[] = { NULL, NULL, NULL };
   gchar buffer[128];
   gchar *size;
   gint size_to_match;
@@ -447,6 +447,12 @@ gtk_font_selection_init(GtkFontSelection *fontsel)
   gchar *property, *text;
   gboolean inserted;
   
+  /* Number of internationalized titles here must match number
+     of NULL initializers above */
+  titles[0] = _("Font Property");
+  titles[1] = _("Requested Value");
+  titles[2] = _("Actual Value");
+
   /* Initialize the GtkFontSelection struct. We do this here in case any
      callbacks are triggered while creating the interface. */
   fontsel->font = NULL;